package com.rf.richfitwheel.dyn.business.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.row.Row;
import com.rf.richfitwheel.common.utils.PageParameter;
import com.rf.richfitwheel.dyn.business.entity.BusinessCommonQueryParam;
import com.rf.richfitwheel.dyn.business.entity.BusinessDynamicParam;

import java.util.Map;

public interface SysBusinessDynamicService {
    /**
     * 分页查询动态表数据
     * @param parameter 参数
     * @return 分页数据
     */
    Page<Row> queryByPage(PageParameter<BusinessCommonQueryParam> parameter);

    /**
     * 动态业务（表）数据保存货提交，暂存、提交
     * @param businessDynamicParam 参数
     * @return 结果
     */
    Boolean saveOrSubmitBusinessDynamic(BusinessDynamicParam businessDynamicParam) throws JsonProcessingException;

    /**
     * 根据业务Id查询业务的表单数据
     * @param parameter 参数
     * @return 数据
     */
    BusinessDynamicParam getDynBusinessInfoById(BusinessDynamicParam parameter);
}
